Skip to content

feat(backend): add Simkl proxy endpoints for Netlify and Supabase - #553

Merged
ProdigyV21 merged 7 commits into
ProdigyV21:mainfrom
Himanth-reddy:simkl/backend
Aug 12, 2026
Merged

feat(backend): add Simkl proxy endpoints for Netlify and Supabase#553
ProdigyV21 merged 7 commits into
ProdigyV21:mainfrom
Himanth-reddy:simkl/backend

Conversation

@Himanth-reddy

@Himanth-reddy Himanth-reddy commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Summary of Changes

This PR introduces backend proxy endpoints for the Simkl API across Netlify Serverless Functions and Supabase Edge Functions.

1. Netlify Functions (netlify-auth-site/)

  • Added handleSimklProxy in _backend.js and entrypoint simkl-proxy.js.
  • Configured path allowlist: /oauth/pin, /oauth/token, /scrobble/*, /sync/*.
  • Enforced rate limiting (100 requests / minute / IP) with HTTP 429 response handling.
  • Kept SIMKL_CLIENT_SECRET strictly server-side during OAuth code/token exchanges.

2. Supabase Edge Functions (supabase/)

  • Created supabase/functions/simkl-proxy/index.ts with identical path allowlist and rate limiting.
  • Forwarded user token headers (x-user-token -> Authorization: Bearer).

Testing & Verification

  • Validated CORS headers and path allowlist security.
  • Tested proxy forwarding with valid and invalid paths.

@github-actions github-actions Bot added area: web Changes to web or Netlify sites area: backend Changes to backend services or infrastructure labels Aug 11, 2026
@github-actions github-actions Bot added the area: android Changes to the Android app or Gradle build label Aug 12, 2026
@github-actions github-actions Bot removed the area: android Changes to the Android app or Gradle build label Aug 12, 2026
@ProdigyV21
ProdigyV21 merged commit 66708b5 into ProdigyV21:main Aug 12, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: backend Changes to backend services or infrastructure area: web Changes to web or Netlify sites

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants